opencc (1.1.1+git20200624+ds2-5) unstable; urgency=medium
- * debian/rules: Enable dh_doxygen integration.
+ * debian/rules: Rewrite to support <!nodoc> build profile.
+ * debian/rules: Enable dh_doxygen when building docs.
* Drop unnecessary build dependencies. (Closes: #981606)
- * debian/control: Drop build-dependency on libjs-jquery, let
- dh_doxygen handle it.
+ * debian/control: Mark build-dependency doxygen as <!nodoc>.
+ * debian/control: Drop build-dependency on libjs-jquery. Let
+ doxygen handle it.
* debian/control: Drop build-dependency on graphviz. Doxyfile
did not enable HAVE_DOT.
* debian/control: Drop build-dependency on dartz. Currently opencc
include /usr/share/dpkg/architecture.mk
%:
- dh $@ --buildsystem=cmake --with pkgkde_symbolshelper,doxygen
+ dh $@ --buildsystem=cmake --with pkgkde_symbolshelper
+
+BUILD_OPTIONS = \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_BUNDLED_LIBMARISA=OFF
+
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+BUILD_OPTIONS += -DBUILD_DOCUMENTATION=ON
+else
+BUILD_OPTIONS += -DBUILD_DOCUMENTATION=OFF
+endif
+
override_dh_auto_configure:
- dh_auto_configure -- \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
- -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_DOCUMENTATION=ON \
- -DBUILD_BUNDLED_LIBMARISA=OFF
+ dh_auto_configure -- $(BUILD_OPTIONS)
execute_after_dh_auto_clean:
find . -name *.pyc -delete
+execute_after_dh_installdocs-indep:
+ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
+ dh_doxygen --indep
+endif
+
override_dh_installdocs:
dh_installdocs -plibopencc-doc --doc-main-package=opencc
dh_installdocs --remaining-packages